<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <!--<base href="http://localhost/">-->
    <title>我的BUS在线</title>
    <script type="text/javascript" src="js/jquery-2.0.3.js"></script>
    <script type="text/javascript" src="js/my.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="css/bootstrap.min.css" >
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/my.css">
    <script type="text/javascript" src="js/bus.js"></script>
    <script type="text/javascript">
        var my_pos;
        function GeoCallback(pos){
            my_pos = {lat:pos.coords.latitude,lng:pos.coords.longitude};
        }
        function GetGeo(){
            if(window.navigator.geolocation){
                window.navigator.geolocation.getCurrentPosition(GeoCallback);
            }else{
                ShowTips("你的浏览器不支持获取地理位置");
            }
        }
        $(function(){
            GetGeo();
            $("#btnTest").on("click",function(){
                alert("lat:" + my_pos.lat+",lng:"+my_pos.lng);
            });
            $("#aRelocation").click(GetGeo);
            $("form.navbar-form button").click(searchBus);
        });
    </script>
</head>
<body>
    <header class="navbar navbar-inverse navbar-fixed-top" role="banner">
        <div class="container">
            <div class="navbar-header">
                <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
                    <span class="sr-only">导航条</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a href="../" class="navbar-brand">公交在线</a>
            </div>
            <form class="navbar-form navbar-right" role="search">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="输入公交路线名">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
            <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
                <ul class="nav navbar-nav">
                    <li>
                        <a href="../getting-started">Getting started</a>
                    </li>
                    <li>
                        <a href="../css">CSS</a>
                    </li>
                    <li class="active">
                        <a href="../components">Components</a>
                    </li>
                    <li>
                        <a href="../javascript">JavaScript</a>
                    </li>
                    <li>
                        <a href="javascript:void(0);" id="aRelocation">我的位置</a>
                    </li>
                </ul>
            </nav>


        </div>
    </header>
    <div class="main-content">
        <div class="alert alert-danger my-alert"></div>
        <div class="row" id="content">

        </div>
        <div class="row"><button id="btnAll">查看所有线路</button></div>
    </div>
</body>
</html>